﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QiCheXiaoShouYongHu1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.panel1.Visible = true;
            this.panel2.Visible = false;
            panel1.BringToFront();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.panel1.Visible = false;
            this.panel2.Visible = true;
            panel2.BringToFront();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            DataTable table = DBHelper.Read("select * from LXMC");
            this.QCleixing.DisplayMember = "LXMC";
            this.QCleixing.ValueMember = "LX_ID";
            this.QCleixing.DataSource = table;


            this.panel1.Visible = true;
            this.panel2.Visible = false;
        }

        private void label4_Click(object sender, EventArgs e)
        {
            string name = this.label4.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
           
        }

        private void label54_Click(object sender, EventArgs e)
        {
            string name = this.label54.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label9_Click(object sender, EventArgs e)
        {
            string name = this.label9.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label12_Click(object sender, EventArgs e)
        {
            string name = this.label12.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label15_Click(object sender, EventArgs e)
        {
            string name = this.label15 .Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label18_Click(object sender, EventArgs e)
        {
            string name = this.label18.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label36_Click(object sender, EventArgs e)
        {
            string name = this.label36.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label39_Click(object sender, EventArgs e)
        {
            string name = this.label39.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label42_Click(object sender, EventArgs e)
        {
            string name = this.label42.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label45_Click(object sender, EventArgs e)
        {
            string name = this.label45.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label48_Click(object sender, EventArgs e)
        {
            string name = this.label48.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label21_Click(object sender, EventArgs e)
        {
            string name = this.label21.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label24_Click(object sender, EventArgs e)
        {
            string name = this.label24.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label27_Click(object sender, EventArgs e)
        {
            string name = this.label27.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label30_Click(object sender, EventArgs e)
        {
            string name = this.label30.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label33_Click(object sender, EventArgs e)
        {
            string name = this.label33.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label51_Click(object sender, EventArgs e)
        {
            string name = this.label51.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label52_Click(object sender, EventArgs e)
        {
            string name = this.label52.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label67_Click(object sender, EventArgs e)
        {
            string name = this.label67.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label60_Click(object sender, EventArgs e)
        {
            string name = this.label60.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label74_Click(object sender, EventArgs e)
        {
            string name = this.label74.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label77_Click(object sender, EventArgs e)
        {
            string name = this.label77.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label80_Click(object sender, EventArgs e)
        {
            string name = this.label80.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label65_Click(object sender, EventArgs e)
        {
            string name = this.label65.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label85_Click(object sender, EventArgs e)
        {
            string name = this.label85.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label88_Click(object sender, EventArgs e)
        {
            string name = this.label88.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void label91_Click(object sender, EventArgs e)
        {
            string name = this.label91.Text.Trim().ToString();
            QICheXiangQing form = new QICheXiangQing(name);
            form.ShowDialog();
        }

        private void QCleixing_SelectedIndexChanged(object sender, EventArgs e)
        {
            int CheShengJieGo = Convert.ToInt32(this.QCleixing.SelectedValue);
            string sql = string.Format(" select * from Car where CheShengJieGo={0}", CheShengJieGo);
            DataTable table = DBHelper.Read(sql);
            this.qiche.DisplayMember = "QiCheMing";
            this.qiche.ValueMember = " CheShengJieGo";
            this.qiche.DataSource = table;
           
        }

        private void button4_Click(object sender, EventArgs e)
        {
            string QiCheMing = this.qiche.Text;
            string sql = string.Format("select *from Car where QiCheMing like  '%{0}%'",QiCheMing );
           
        }


    }
}
